home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1991 October
/
1991-10.d64
/
mob mover 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
167 lines
0 clr
5 rem copyright 1991 - compute publications intl ltd - all rights reserved
10 poke53280,.:poke53281,.:print"[147]";:printtab(13)"[167] [205][207][194] [205]over! [146][165]
20 [129]x[178]1[164]1000:[130]:v[178]53248:b1[178]2040:b2[178]192:[153]"load";:[141]40
30 [141]850:[141]90:[141]1330:[137]30
40 c(1)[178].:c(2)[178]1:[129]x[178].[164]7:s(x)[178].:[129]y[178]1[164]2:co(x,y)[178]v[170](x[172]2[170]c(y)):[130]y,x
50 sv[178]1:bc[178].:cc[178]1:s(.)[178]1:as[178].:[129]x[178].[164]7:[151](b1[170]x),(b2[170]x):[130]
60 sp$[178]" ":[151]v[170]21,1:[151]v[170]16,.
70 [129]x[178].[164]7:id$(x)[178]" ":[130]
80 [151]v[170]21,1:[151]v[170]28,.:[151]v[170]23,.:[151]v[170]29,.:[142]
90 [153]"(NULL)(NULL)peekclose(NULL)over!wait";:[139]co[178]1[167][153]"onon (NULL)ascasc":[142]
110 [153]:[129]x[178].[164]7:[139]as[178]x[167][153]"";
120 [139]s(x)[178]1[167][153]id$(x);x;":";[196]([194](co(x,1)))" /";[196]([194](co(x,2)));
130 [139]s(x)[178]1[167][153]"wait "
135 [153]"wait";:[130]:[142]
140 bc[178]bc[170]1:[139]bc[178]16[167]bc[178].
150 [139]bc[178]cc[167]bc[178]bc[170]1
160 [151]53280,bc:[151]53281,bc:[142]
170 cc[178]cc[170]1:[139]cc[178]16[167]cc[178].
180 [139]cc[178]bc[167]cc[178]cc[170]1
190 [151]646,cc:[142]
200 msg$[178]"(NULL)ew step value":[141]820:[133]a$:sv[178][197](a$):[139]sv[179][178].[167]sv[178]1
210 [142]
220 msg$[178]"ascill sprite #"[170][196](as)[170]": [y/n]":[141]820:[141]870
230 [139]a$[178]"y"[167]250
240 [142]
250 sp[178]([194](b1[170]as))[172]64:[129]x[178].[164]63:[151]sp[170]x,255:[130]:[142]
260 [153]" waitcmd";:[161]a$:[139]a$[178]""[176]a$[178]"on"[176]a$[178]""[176]a$[178]"cmd"[167]320
270 [139]a$[178]""[167][153]" ";:[153]a$;:[137]260
280 [139]a$[178][199](13)[167]310
290 [139]a$[178][199](141)[167][153]" ";:[142]
300 [153]a$;:[137]260
310 [153]" ";:[153]a$;:[137]260
320 [153]" cmd";:[153]a$;:[137]260
330 msg$[178]"lenhange active sprite's pointer to":[141]820:[133]a$
340 a[178][197](a$):[139]a[179][178].[167][142]
350 [151]b1[170]as,a:[142]
360 msg$[178]"lenhange to sprite # [0-7]":[141]820:[141]870:a[178][197](a$)
370 [139]a[177]7[167]a[178]as
380 as[178]a:s(as)[178]1:[151]v[170]21,[194](v[170]21)[176](2[174]as):[142]
390 msg$[178]"right$nput (NULL) co-ordinate":[141]820:[133]i$:c1[178][197](i$)
391 [139]c1[179]0[176]c1[177]255[167][142]
400 [141]850:msg$[178]"right$nput (NULL) co-ordinate":[141]820:[133]i$:c2[178][197](i$)
410 [139]c2[179]0[176]c2[177]255[167][142]
420 [151]co(as,1),c1:[151]co(as,2),c2:[142]
650 [151]v[170]21,[194](v[170]21)[176](2[174]as):[142]
660 [151]v[170]21,[194](v[170]21)[175](255[171]2[174]as):[142]
670 [129]x[178].[164]7:[151]b1[170]x,b2[170]x:[142]
680 mv[178][194](co(as,1)):[139]mv[171]sv[179]0[175]xp(as)[178]1[167]710
690 [139]mv[171]sv[179]0[167][142]
700 mv[178]mv[171]sv:[151](co(as,1)),mv:[142]
710 [151](v[170]16),[194](v[170]16)[175](255[171](2[174]as)):id$(as)[178]" ":mv[178](mv[171]sv)[170]255:xp(s)[178].
720 [151](co(as,1)),mv:[142]
730 mv[178][194](co(as,1)):[139]mv[170]sv[177]255[175]xp(as)[178].[167]760
740 [139]mv[170]sv[177]255[167][142]
750 mv[178]mv[170]sv:[151](co(as,1)),mv:[142]
760 [151](v[170]16),[194](v[170]16)[176](2[174]as):mv[178]mv[170]sv:mv[178]mv[171]255:[151]co((as,1)),mv:xp(as)[178]1
770 id$(as)[178]"*":[142]
780 mv[178][194](co(as,2)):[139]mv[171]sv[179].[167][142]
790 mv[178]mv[171]sv:[151](co(as,2)),mv:[142]
800 mv[178][194](co(as,2)):[139]mv[170]sv[177]255[167][142]
810 mv[178]mv[170]sv:[151](co(as,2)),mv:[142]
820 [153]"";sp$;sp$;
830 [129]x[178]1[164]40:[153]"tan";:[130]
840 [153]"";msg$;:[142]
850 [153]"";sp$;sp$;sp$;sp$
860 [153]"";:[142]
870 [151]198,.:[146]198,1:[161]a$:[142]
880 sc[178]([194](v[170]39[170]as)):sc[178]sc[170]1:[139]sc[178]256[167]sc[178].
890 [151]((v[170]39)[170]as),sc:[142]
900 [139]mc(as)[178].[167]mc(as)[178]1:[151]v[170]28,[194](v[170]28)[176](2[174]as):[142]
910 [139]mc(as)[178]1[167]mc(as)[178].:[151]v[170]28,[194](v[170]28)[175](255[171]2[174]as):[142]
920 [139]xe(as)[178].[167]xe(as)[178]1:[151]v[170]29,[194](v[170]29)[176](2[174]as):[142]
930 [139]xe(as)[178]1[167]xe(as)[178].:[151]v[170]29,[194](v[170]29)[175](255[171]2[174]as):[142]
940 [139]ye(as)[178].[167]ye(as)[178]1:[151]v[170]23,[194](v[170]23)[176](2[174]as):[142]
950 [139]ye(as)[178]1[167]ye(as)[178].:[151]v[170]23,[194](v[170]23)[175](255[171]2[174]as):[142]
960 [139]pr(as)[178].[167]pr(as)[178]1:[151]v[170]27,[194](v[170]27)[176](2[174]as):[142]
965 [139]pr(as)[178]1[167]pr(as)[178].:[151]v[170]27,[194](v[170]27)[175](255[171]2[174]as):[142]
970 [139]co[178].[167]co[178]1:[142]
980 [139]co[178]1[167]co[178].:[142]
990 [129]x[178].[164]7:[129]y[178]1[164]2:[151]co(x,y),.:[130]y,x:[142]
1000 mc[178][194](v[170]37):mc[178]mc[170]1:[139]mc[177]256[167]mc[178].
1010 [151]v[170]37,mc:[142]
1020 mc[178][194](v[170]38):mc[178]mc[170]1:[139]mc[177]256[167]mc[178].
1030 [151]v[170]38,mc:[142]
1040 msg$[178]"(NULL)ocation to poke":[141]820:[133]a$:lo[178][197](a$)
1050 [139]lo[179][178].[176]lo[177]65535[167][142]
1060 [141]850:msg$[178]"(NULL)umber to poke":[141]820:[133]a$:nu[178][197](a$)
1070 [139]nu[179]0[176]nu[177]255[167][142]
1080 [151]lo,nu:[142]
1090 [139]ao[178].[167]ao[178]1:[151]v[170]21,255:[129]x[178].[164]7:s(x)[178]1:[130]:[142]
1100 [139]ao[178]1[167]ao[178].:[151]v[170]21,.:[129]x[178].[164]7:s(x)[178]0:[130]:[153]"load":[142]
1110 [129]x[178].[164]7:[151]co(x,1),155:[151]co(x,2),130:[130]:[142]
1120 msg$[178]"(NULL)creen or (NULL)rinter?":[141]820:[146]198,1:[161]a$
1121 [139]a$[179][177]"p"[167]s[178]1
1122 [159]4,(4[171]s),7
1123 pv[178][194](v[170]21):[151]v[170]21,.:[152]4,"load(NULL)ocation","(NULL)oke","(NULL)bjective"
1130 [152]4,v[170]21,pv,"(NULL)urns on sprites
1140 forx=.to7:ifs(x)=.thennext:goto1160
1150 print#4,b1+x,peek(b1+x),"[211]prite"x"[208]ointer":next
1160 forx=.to7:ifs(x)=.thennext:goto1180
1170 print#4,(peek(b1+x))*64,"data","[211]prite"x"data":next
1180 ifsthenpk$="[208]ress [193]ny [203]ey to [195]ontinue":printpk$:gosub870
1190 ifsthenprint"[147][204]ocation","[208]oke","[207]bjective
1200 [129]x[178].[164]7:[139]s(x)[178].[167][130]:[137]1220
1210 [152]4,(v[170]39[170]x),[194](v[170]39[170]x),"(NULL)prite"x"lenolor":[130]
1220 [139][194](v[170]28)[167]1250
1230 [152]4,(v[170]28),[194](v[170]28),"(NULL)et (NULL)ulticolor (NULL)ode
1240 print#4,(v+37),peek(v+37),"[205]ulticolor 1"
1245 print#4,v+38,peek(v+38),"[205]ulticolor 2
1250 [152]4,v[170]29,[194](v[170]29),"(NULL)prites (NULL) expand
1260 print#4,v+23,peek(v+23),"[211]prites [217] expand
1270 [139]s[167][153]pk$:[141]870
1280 [139]s[167][153]"load(NULL)ocation","(NULL)oke","(NULL)bjective
1290 forx=.to7:ifs(x)=.thennext:goto1310
1300 fory=1to2:print#4,co(x,y),peek(co(x,y)),"[211]prite"x"[208]osition":nexty,x
1310 ifpeek(v+16)thenprint#4,v+16,peek(v+16),"[205][211][194][160][216][160][208]osition
1320 [153]pk$;:[146]198,1:[151]198,0:[153]"load":[128]
1330 c$[178]"abcefhpst+-*^_cmdoninputdimreadletload <>=di"
1339 cn[178].
1340 [161]a$:joy[178][168][194](56320)[175]15:[139]joy[167][141]3000
1345 [139]a$[179][177]""[167][137]1350
1347 [137]1340
1350 [129]x[178]1[164]30:[139]cn[167]x[178]30:[130]:[137]1380
1360 [139]a$[178][202](c$,x,1)[167]cn[178]x
1370 [130]:[137]1340
1380 [145]cn[137]360,140,170,1120,220,2000,330,200,260,650,660,1090,1110,1040
1390 [145]cn[171]14[137]680,730,780,800,900,920,940,990,670,880,1020,1000,960,970,390
1400 [137]1340
2000 so[178][194](v[170]21):[151]v[170]21,0
2005 [153]"load(NULL)(NULL)peekclose(NULL)over!wait left$elp (NULL)creen 1 of 2 "
2010 [153]"atn","lenhange active sprite
2020 print"[194]","[195]hange background color
2030 [153]"len","lenhange character color
2040 print"[196]","[195]hart display on/off
2050 [153]"val","valxit program/view pokes
2060 print"[198]","[198]ill active sprite
2070 [153]"left$","left$elp screens
2075 print"[201]","[201]nput co-ordinates
2080 [153]"(NULL)","(NULL)prite pointer
2090 print"[211]","[211]et step value
2100 [153]"(NULL)","(NULL)ype on screen
2110 printsp$;sp$;sp$;"[208]ress any key":poke198,0:wait198,1
2200 print"[147][205][207][194][160][205]over![146] [200]elp [211]creen 2 of 2 "
2210